﻿using System.Text;
using System.Configuration;

namespace FCMS.Configuration.Route
{
    public class RoutingElement : ConfigurationElement
    {
        [ConfigurationProperty("url", IsRequired = true, IsKey = true)]
        public string Url
        {
            get { return this["url"].ToString(); }
            set { this["url"] = value; }
        }

        [ConfigurationProperty("controller", IsRequired = true, IsKey = true)]
        public string Controller
        {
            get { return this["controller"].ToString(); }
            set { this["controller"] = value; }
        }

        [ConfigurationProperty("action", IsRequired = true, IsKey = true)]
        public string Action
        {
            get { return this["action"].ToString(); }
            set { this["action"] = value; }
        }

        [ConfigurationProperty("constraints", IsRequired = false)]
        public ConstraintCollection Constraints
        {
            get { return (ConstraintCollection)(this["constraints"]); }
            set { this["constraints"] = value; }
        }
    }
}
